import { writable } from 'svelte/store'
import { localStore } from './localStore'
import type {TodoType} from './types/todo.type'

export const alert = writable<string>('Welcome to the To-Do list app!')

const initialTodos: TodoType[] = [
    { id: 1, name: "Create a Svelte starter app", completed: true },
    { id: 2, name: "Create your first component", completed: true },
    { id: 3, name: "Complete the rest of the tutorial", completed: false },
]
export const todos = localStore<TodoType[]>('mdn-svelte-todo', initialTodos)